﻿@model Wiwi.ViewModels.WantCommunication

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")
    <div class="grid_6" id="wiwi-sign-up">
        <fieldset>
            <legend>Account Information</legend>

            
            <div class="editor-field">
                @Html.HiddenFor(m=> m.wnt.WantID) 
                @Html.HiddenFor(m=> m.SupplierID)
                @Html.HiddenFor(m=> m.wnt.UserID) 
                @Model.wnt.Fname @Model.wnt.Lname
            </div>
            
            <div class="editor-label">
                Want description
            </div>
            <div class="editor-field">
                @Model.wnt.WantDesc

            </div>
            <hr />
            @if (Model.SupplierID != "")
            {
                foreach (var itm in Model.comms)
                {
                <div class="editor-label">
                @itm.Act_Name @itm.CommDate <br />
                @itm.ClientFname @itm.ClientLname
                </div>
                <div class="editor-field">
                    @itm.Act_Name <br />
                    @itm.Comments 
                </div>
                <hr />
                }
                if (Model.PicthApprove > 0 && Model.wnt.IsClosed !=true)
                {
                <div class="editor-label">
                    Reply
                </div>
                <div class="editor-field">
                    @Html.TextAreaFor(m => m.ReplyText) 
                    @Html.ValidationMessageFor(m => m.ReplyText) 
                </div>
                <p>
                    <input type="submit" value="Reply" />
                </p>
                }
            }
        </fieldset>
    </div>
}
